< previous page page_180 next page >

Page 180
LISTING 8.2.CONTINUED
9f8044bafea36a1f728739c0bb58ef4c.gif
 72: Public Property Get DepositType() As Byte
 73: 'used when retrieving value of a property, on the right side of an
      assignment.
 74: 'Syntax: Debug.Print X.DepositType
 75:
 76: 'Purpose: To determine if cash or check
 77: 'being deposited. If Cash, must enforce
 78: 'federal law for deposits of $10000 or more.
 79: 'If check, FundsAvailabilityDate is set to
 80: 'ten business days from today.
 81:     DepositType = mvarDepositType
 82: End Property
 83:
 84:
 85: Friend Sub depositFunds(argAccountNumber As String)
 86:     'You'll use Call for the sake of simplicity.
 87:     Call theBasicPersonalCheckingAccount.adjustBalance(Me,
        argAccountNumber)
 88: End Sub
 89:
 90: Public Property Let Amount(ByVal vData As Single)
 91: 'used when assigning a value to the property, on the left side of an assignment.
 92:
      'Syntax: X.Amount = 5
 93:     mvarAmount = vData
 94: End Property
 95:
 96:
 97: Public Property Get Amount() As Single
 98: 'used when retrieving value of a property, on the right side of an
       assignment.
 99: 'Syntax: Debug.Print X.Amount
100:     Amount = mvarAmount
101: End Property

Listing 8.3 shows the BasicPersonalChecking class. The method increaseBalance, which is called by the adjustBalance public interface method, provides specific behavior implementation for deposit transactions. It invokes the enforceCashDepositLimit method of the localDeposit object. If this method processes successfully according to its policy enforcement goal, there's no need to invoke the object's other method, enforceFundsAvailability. However, if enforceCashDepositLimit was not able to handle the message, enforceFundsAvailability is indeed invoked. Note that you don't

 
< previous page page_180 next page >

If you like this book, buy it!